<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>

    <meta charset="utf-8"/>
    <title>Web configurator Feature Assembly Models</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta name="description" content="Multi-staged web configurator for Feature Assembly Models"/>
    <meta name="author" content="Jasmien"/>

    <!-- Le styles -->
    <link href="../../resources/css/bootstrap.css"
          th:href="@{/resources/css/bootstrap.min.css}"
          rel="stylesheet"/>
  <style>

        body {
        padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
        }
    </style>
    <link href="../../resources/css/bootstrap-responsive.css"
          th:href="@{/resources/css/bootstrap-responsive.min.css}"
          rel="stylesheet"/>

    <link rel="shortcut icon" href="../../resources/img/favicon.ico"/>
    <script type="text/javascript">$.SyntaxHighlighter.init();</script>
</head>

<body>

<div class="navbar navbar-inverse navbar-fixed-top">
    <div class="navbar-inner">
        <div class="container">
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="brand" href="#">Web configurator Feature Assembly Models</a>

            <div class="nav-collapse collapse">
                <ul class="nav">
                    <li class="active"><a href="home.html" th:href="@{/}">Home</a></li>
                    <li><a href="about.html" th:href="@{/about}">About</a></li>
                    <li><a href="contact.html" th:href="@{/contact}">Contact</a></li>
                </ul>
            </div>
            <!--/.nav-collapse -->
        </div>
    </div>
</div>

<div class="container">

    <h1>Web Configurator for Feature Assembly Models</h1>
    <br/>
    <br/>
    <br/>
    <p>Choose the Feature Assembly Model you want to configure.</p>
    <p>The Feature Assembly Model needs to be in the xml-format, an example of this format is given below</p>
    <br/>
    <br/>
    <br/>
    <form action="perspectives.html" th:action="@{/}" th:object="${fileModel}" method="post"
          enctype="multipart/form-data">
        <input type="file" th:field="*{file}" />
        <button type="submit" class="btn btn-primary">Submit</button>
    </form>
    <p>
        <br/>
        <br/>
        <br/>
    </p>

    <div class="entry">
        <h5>The syntax for the Feature Assembly Models</h5>
        <br/>

<pre class="language-xml">
&lt;<span class="xmltag">productline</span> <span class="xmlattr">xmlns:xsi</span>="http://www.w3.org/2001/XMLSchema-instance" <span class="xmlattr">xsi:noNamespaceSchemaLocation</span>="FAM_xml.xsd"&gt;                                                      &lt;-- Feature Assembly Model start tag and attributes (mandatory)
    &lt;<span class="xmltag">description</span>&gt; This is a product line that defines ...&lt;<span class="xmltag">/description</span>&gt;                                             &lt;--description of the productline
    &lt;<span class="xmltag">perspective</span> <span class="xmlattr">name</span>="System Perspective"&gt;                             &lt;--opening tag for the different perspectives of the system
        &lt;<span class="xmltag">description</span>&gt; This is the discription of the perspective.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the perspective
        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
            &lt;<span class="xmltag">mandatoryComposition</span>&gt;
                &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="abstract"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                    &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                    &lt;<span class="xmltag">cardinality</span> <span class="xmlattr">min</span>="1"&gt;&lt;<span class="xmltag">max</span>="2"&gt;
                    &lt;<span class="xmltag">option</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                            &lt;<span class="xmltag">excludes</span>&gt;featureId&lt;<span class="xmltag">/excludes</span>&gt;                                                          &lt;-- excludes-relationship between the feature
                            &lt;<span class="xmltag">excludes</span>&gt;featureId&lt;<span class="xmltag">/excludes</span>&gt;                                                          &lt;-- excludes-relationship between the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                            &lt;<span class="xmltag">requires</span>&gt;featureId&lt;<span class="xmltag">/requires</span>&gt;                                                          &lt;-- requires-relationship between the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                    &lt;<span class="xmltag">/option</span>&gt;
                &lt;<span class="xmltag">/feature</span>&gt;
                &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="abstract"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                    &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                    &lt;<span class="xmltag">cardinality</span> <span class="xmlattr">min</span>="2"&gt;&lt;<span class="xmltag">max</span>="6"&gt;
                    &lt;<span class="xmltag">option</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                            &lt;<span class="xmltag">requires</span>&gt;featureId&lt;<span class="xmltag">/requires</span>&gt;                                                          &lt;-- requires-relationship between the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                    &lt;<span class="xmltag">/option</span>&gt;
                &lt;<span class="xmltag">/feature</span>&gt;
            &lt;<span class="xmltag">/mandatoryComposition</span>&gt;
            &lt;<span class="xmltag">optionalComposition</span>&gt;
                &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="abstract"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                    &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                    &lt;<span class="xmltag">cardinality</span> <span class="xmlattr">min</span>="1"&gt;&lt;<span class="xmltag">max</span>="2"&gt;
                    &lt;<span class="xmltag">option</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                            &lt;<span class="xmltag">excludes</span>&gt;featureId&lt;<span class="xmltag">/excludes</span>&gt;                                                          &lt;-- excludes-relationship between the feature
                            &lt;<span class="xmltag">excludes</span>&gt;featureId&lt;<span class="xmltag">/excludes</span>&gt;                                                          &lt;-- excludes-relationship between the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                            &lt;<span class="xmltag">requires</span>&gt;featureId&lt;<span class="xmltag">/requires</span>&gt;                                                          &lt;-- requires-relationship between the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                    &lt;<span class="xmltag">/option</span>&gt;
                &lt;<span class="xmltag">/feature</span>&gt;
                &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="abstract"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                    &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                    &lt;<span class="xmltag">cardinality</span> <span class="xmlattr">min</span>="2"&gt;&lt;<span class="xmltag">max</span>="6"&gt;
                    &lt;<span class="xmltag">option</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                            &lt;<span class="xmltag">requires</span>&gt;featureId&lt;<span class="xmltag">/requires</span>&gt;                                                          &lt;-- requires-relationship between the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                        &lt;<span class="xmltag">feature</span> <span class="xmlattr">xsi:type</span>="concrete"&gt;&lt;<span class="xmltag">name</span>="featureName"&gt;<span class="xmltag">id</span>="featureId"&gt;
                            &lt;<span class="xmltag">description</span>&gt; This is the discription of the feature.&lt;<span class="xmltag">/description</span>&gt;                                     &lt;--description of the feature
                        &lt;<span class="xmltag">/feature</span>&gt;
                    &lt;<span class="xmltag">/option</span>&gt;
                &lt;<span class="xmltag">/feature</span>&gt;
            &lt;<span class="xmltag">/optionalComposition</span>&gt;
        &lt;<span class="xmltag">/feature</span>&gt;
    &lt;<span class="xmltag">/perspective</span>&gt;

    &lt;<span class="xmltag">perspective</span> <span class="xmlattr">name</span>="User Perspective"&gt;
    ...
    ...
    ...
    &lt;<span class="xmltag">/perspective</span>&gt;
&lt;<span class="xmltag">/productline</span>&gt;                                                                        &lt;-- Feature Assembly Model end tag  (mandatory)
</pre>

</div>


</div>
<!-- /container -->


<!-- FOOTER -->
<hr/>
<footer>
    <p>
        <strong>&copy; 2013
            <a href="#">Jasmien De Ridder
            </a>, All Rights Reserved &reg;
        </strong>
    </p>
</footer>
<!-- /FOOTER -->

<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../../resources/js/jquery-2.0.2.min.js"
        th:href="@{/resources/js/jquery-2.0.2.min.js}"></script>
<script src="../../resources/js/bootstrap.min.js"
        th:href="@{/resources/js/bootstrap.min.js}"></script>
<script type="text/javascript" src="http://balupton.github.com/jquery-syntaxhighlighter/scripts/jquery.syntaxhighlighter.min.js"></script>


<script type="text/javascript">
    $(document).ready(function() {
        $("form").submit(function(){
            var fileInput = $(this).find("input[type=file]");
            var fileName = fileInput.val();
            var ext = fileName.substring(fileName.lastIndexOf('.') + 1);
            if(ext != "xml")
            {
                alert("Upload xml-files with the Feature Assembly structure only");
                fup.focus();
                return false;
            }
            return true;
        });
    });
</script>



</body>
</html>
